﻿
//Author: 张亚涛
//createtime:2015-12-24 09:57:15
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;

namespace BLL
{

    /// <summary>
    /// 该类提供了一系列操作 "Price" 表的方法;
    /// </summary>
    public class PriceService
    {
        #region .对本表的维护.
        #region select data
        /// <summary>
        /// 返回Price表的所有数据  
        /// </summary>
        /// <returns></returns>        
        public static List<Price> GetAllPrice()
        {
            return PriceBase.GetAllPrice();
        }
        /// <summary>
        /// 根据Price表的ID字段返回数据  
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns></returns>        
        public static Price GetPriceById(int id)
        {
            return PriceBase.GetPriceById(id);
        }
        #endregion
        #region delete data
        /// <summary>
        /// 根据Price表的ID字段删除数据 
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>返回受影响的行数</returns>
        public static int DeletePriceById(int id)
        {
            return PriceBase.DeletePriceById(id);
        }
        #endregion
        #region update data
        /// <summary>
        /// 根据Price表的ID字段更新数据 
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="Price">price</param>
        /// <returns>返回受影响的行数</returns>
        public static int UpdatePriceById(Price price)
        {
            return PriceBase.UpdatePriceById(price);
        }
        #endregion
        #region insert data
        /// <summary>
        /// 向Price表插入一条数据，插入成功则返回自增列数值，插入不成功则返回-1 
        /// </summary>
        /// <param name="price">Price</param>        
        /// <returns></returns>
        public static int AddPrice(Price price)
        {
            return PriceBase.AddPrice(price);
        }
        #endregion
        #endregion

        #region .SQL语句汇总.
        /// <summary>
        /// 返回Price表的所有数据（SQL语句） 
        /// </summary>
        /// <returns></returns>        
        public static string GetAllPrice_SQL()
        {
            return PriceBase.GetAllPrice_SQL();
        }
        #endregion
    }
}